package com.changli06._abstract.exer1;

public class GeometricTest {
    public static void main(String[] args) {
        GeometricTest test = new GeometricTest();
        GeometricObject g1 = new MyRectangle("red",5.0,2.0,5.0);
        GeometricObject g2 = new Circle("white",2.0,5.0);
        test.displayGeometricObjectArea(g1);
        test.displayGeometricObjectArea(g2);
        System.out.println(test.equalArea(g1, g2));

    }
    public boolean equalArea(GeometricObject g1, GeometricObject g2) {
        if(g1.findArea()==g2.findArea()){
            return true;
        }
        return false;
    }
    public void displayGeometricObjectArea(GeometricObject g1){
        System.out.println(g1.findArea());
    }
}
